package com.ssy.lingxi.product.api.hystrix;

import com.ssy.lingxi.common.exception.BusinessException;
import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.product.api.feign.ICommodityFeign;
import com.ssy.lingxi.product.api.model.request.CommodityCreditScore;
import com.ssy.lingxi.product.api.model.request.CommoditySold;
import com.ssy.lingxi.product.api.model.request.MemberRequest;
import com.ssy.lingxi.product.api.model.request.SimpleIdListRequest;
import com.ssy.lingxi.product.api.model.request.feign.CommodityPriceRequest;
import com.ssy.lingxi.product.api.model.request.feign.CommodityPublishRequest;
import com.ssy.lingxi.product.api.model.request.feign.OffPublishCommodityRequest;
import com.ssy.lingxi.product.api.model.response.BrandResponse;
import com.ssy.lingxi.product.api.model.response.channelCommodity.ChannelCommodityESResponse;
import com.ssy.lingxi.product.api.model.response.commodity.*;
import com.ssy.lingxi.product.api.model.response.feign.CommodityPriceResponse;
import com.ssy.lingxi.product.api.model.response.feign.CommoditySkuStockResponse;
import com.ssy.lingxi.product.api.model.response.store.StoreResponse;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;
import java.util.Map;

/**
 * 业务模块-商品管理熔断服务实现类
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/6/24
 */
@Component
@Qualifier("commodityHystrix")
public class CommodityHystrix implements ICommodityFeign {
    @Override
    public Wrapper<Boolean> getCommodityUseTemplate(Long id) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<Boolean> getCommodityUseSendAddress(Long id) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<Boolean> getCommodityUseCompany(Long id) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<Boolean> getCommodityUseUnit(Long id) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Map<Long, Map<String, Double>> getCommodityPriceBatch(@RequestBody CommodityPriceRequest commodityPriceRequest) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Map<Long, CommodityPriceResponse> getCommodityPriceAndMemberPriceBatch(CommodityPriceRequest commodityPriceRequest) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<List<Long>> getMemberIdList(Long id) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Map<Long, StoreResponse> getCommodityAndCategoryByMemberId(SimpleIdListRequest simpleIdListRequest) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Map<String, StoreResponse> getCommodityAndCategoryByMemberIdAndMemberRoleId(List<MemberRequest> memberRequestList) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public CommodityDetailResponse getCommodity(Long id) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public CommodityBaseResponse getCommodityBySkuId(Long id) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public PageData<CommodityDetailResponse> getAllOnShelfCommodity(Integer current, Integer pageSize) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public ChannelCommodityESResponse getChannelCommodity(Long id) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public PageData<ChannelCommodityESResponse> getAllOnShelfChannelCommodity(Integer current, Integer pageSize) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<Boolean> offPublishAllCommodity(OffPublishCommodityRequest offPublishCommodityRequest) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<List<CommoditySkuStockResponse>> getCommoditySkuStock(@RequestBody CommodityPriceRequest commodityPriceRequest) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<List<CustomerCategoryResponse>> getCustomerCategoryById(List<Long> idList) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<List<BrandResponse>> getBrandById(List<Long> idList) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<List<CommodityGoodsResponse>> getCommodityByCommoditySkuIdList(List<Long> commoditySkuIdList) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<List<UpperCommodityResponse>> getUpperCommodityByCommoditySkuIdList(List<Long> commoditySkuIdList) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<String> getCommodityIsPublish(CommodityPublishRequest commodityPublishRequest) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<List<Long>> getCommodityListByIsPublish(CommodityPublishRequest commodityPublishRequest) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<Boolean> updateCommoditySold(@RequestBody CommoditySold commoditySold) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<Boolean> updateChannelCommoditySold(CommoditySold commoditySold) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<Boolean> updateCommodityCreditScore(CommodityCreditScore commodityCreditScore) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public List<CommodityOrderResponse> getCommodityListByOrder(CommodityPriceRequest commodityPriceRequest) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<List<CommoditySkuIdAndFirstCategoryIdResponse>> getCommodityFirstCategoryIdList(@Valid SimpleIdListRequest simpleIdListRequest) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }

    @Override
    public Wrapper<List<GoodsIdAndFirstCategoryIdResponse>> getGoodsFirstCategoryIdList(@Valid SimpleIdListRequest simpleIdListRequest) {
        throw new BusinessException(ResponseCode.SERVICE_PRODUCT_ERROR);
    }
}
